module.exports = [
  // 资源分类数据
  {
    url: "/vue-admin-template/resource/sort",
    type: "get",
    response: (_) => {
      return {
        code: 20000,
        data: {
          sort_list: [
            {
              log_id: 1,
              sort_name: "挂几个",
            },
            {
              log_id: 2,
              sort_name: "zl_001",
            },
            {
              log_id: 3,
              sort_name: "zl_001",
            },
            {
              log_id: 5,
              sort_name: "zl_001",
            },
            {
              log_id: 4,
              sort_name: "zl_001",
            },
            {
              log_id: 6,
              sort_name: "zl_001",
            },
            {
              log_id: 7,
              sort_name: "zl_001",
            },
          ],
        },
      };
    },
  },
  // 资源分类数据
  {
    url: "/vue-admin-template/resource/sort",
    type: "get",
    response: (_) => {
      return {
        code: 20000,
        data: {
          sort_list: [
            {
              log_id: 1,
              sort_name: "挂几个",
            },
            {
              log_id: 2,
              sort_name: "zl_001",
            },
            {
              log_id: 3,
              sort_name: "zl_001",
            },
            {
              log_id: 5,
              sort_name: "zl_001",
            },
            {
              log_id: 4,
              sort_name: "zl_001",
            },
            {
              log_id: 6,
              sort_name: "zl_001",
            },
            {
              log_id: 7,
              sort_name: "zl_001",
            },
          ],
        },
      };
    },
  },
  //   资源列表数据
  {
    url: "/vue-admin-template/log/list",
    type: "post",
    response: (_) => {
      return {
        code: 20000,
        data: {
          list: [
            {
              log_id: 1,
              sort_name: "zl_001",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              cover_image_url: "",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
            {
              log_id: 2,
              sort_name: "zl_002",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              cover_image_url: "",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
            {
              log_id: 3,
              sort_name: "zl_003",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              cover_image_url: "",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
            {
              log_id: 5,
              sort_name: "zl_004",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              cover_image_url: "",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
            {
              log_id: 4,
              sort_name: "zl_005",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
            {
              log_id: 6,
              sort_name: "zl_006",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
            {
              log_id: 7,
              sort_name: "zl_007",
              ip: "1.2.3.4",
              site: "广东深圳市",
              system: "Windows 10",
              browser: "Chrome:122",
              upload_time: "2024-03-01",
              upload_user: "登录成功",
              review_status: 1,
            },
          ],
        },
      };
    },
  },
  // 单个删除资源
  {
    url: "/vue-admin-template/resource/delete",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
  // 删除多个资源
  {
    url: "/vue-admin-template/resource/mul_delete",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
  // 添加资源信息
  {
    url: "/vue-admin-template/resource/add",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
  // 单个删除资源
  {
    url: "/vue-admin-template/resource/delete",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
  // 删除多个资源
  {
    url: "/vue-admin-template/resource/mul_delete",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
  // 添加资源信息
  {
    url: "/vue-admin-template/resource/add",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
  // 添加资源分类
  {
    url: "/vue-admin-template/resource/add_sort",
    type: "post",
    response: (config) => {
      const { token } = config.query;
      const info = users[token];

      // mock error
      if (!info) {
        return {
          code: 50008,
          message: "Login failed, unable to get user details.",
        };
      }

      return {
        code: 20000,
        data: info,
      };
    },
  },
];
